<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>数据导入</title>
    <link rel="stylesheet" href="../../../assets/libs/layui/css/layui.css"/>
    <link rel="stylesheet" href="../../../assets/module/dtree/dtree.css"/>
    <link rel="stylesheet" href="../../../assets/module/dtree/font/dtreefont.css"/>
    <link rel="stylesheet" href="../../../assets/module/admin.css?v=313"/>

    <link rel="stylesheet" href="../../../assets/libs/ztree/css/zTreeStyle/zTreeStyle.css">

    <link rel="stylesheet" href="../../../assets/css/publicStyle.css"/>
    <script src="../../../assets/libs/jquery/jquery-3.2.1.min.js"></script>
    <!--[if lt IE 9]>
    <script src="../../../assets/libs/html5shiv.min.js"></script>
    <script src="../../../assets/libs/respond.min.js"></script>
    <![endif]-->
    <script src="../../../assets/libs/template-web.js"></script>
    <link rel="stylesheet" href="../../../assets/css/macro/templateManage.css">

    <style>
        .template{
            height:calc(100vh - 30px)!important;
            overflow: auto;
        }
        .region-box{
            margin-top:15px;
        }
        .region-content{
            height:calc(100vh - 491px)!important;
        }
        .layui-fluid .layui-card {
            height: auto;
            overflow: auto;
        }
        .hiddenTree{
            display: none;
        }
        #groupRegion{
            border: 1px solid #ddd;
            border-radius: 0 0 3px 3px;
            position: absolute;
            width: 163px;
            height: calc(50vh - 170px);
            top: 90px;
            left: 75px;
            display: none;
            overflow: auto;
        }
        .importDataModel{
            margin:15px;
        }
        #importDataRegionBox .regionLabel{
            text-align: left;
            width: 58px;
        }
        #importDataRegionBox{
            height: calc(50vh - 86px);
        }

    </style>
</head>
<body>

<!-- 加载动画 -->
<div class="page-loading">
    <div class="ball-loader">
        <span></span><span></span><span></span><span></span>
    </div>
</div>

<!-- 正文开始 -->
<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <ul id="x" class="ztree hiddenTree" ></ul>
        <ul id="y" class="ztree hiddenTree" ></ul>
        <div class=" layui-col-sm12 layui-col-md2 layui-col-lg2">
            <div class="layui-row ">
                <div class="layui-card">
                    <div class="layui-card-header">报告期</div>
                    <div class="layui-card-body report-content" >
                        <ul id="reportData" class="ztree importDataReportHeight" ></ul>
                    </div>
                </div>
            </div>
            <div class="layui-row region-box ">
                <div class="layui-card">
                    <div class="layui-card-header">区划</div>
                    <div class="layui-card-body " id="importDataRegionBox">
                        <form class="layui-form" action="">
                            <div class="layui-form-item">
                                <label class="layui-form-label regionLabel">区划配置</label>
                                <div class="layui-input-block regionSetSelect">
                                    <select name="regionSet" lay-filter="regionSet" id="region-tree-box">
                                    </select>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label regionLabel">区划</label>
                                <div class="layui-input-block regionSetSelect" id="regionInput">
                                    <input type="text"  name="region" lay-verify="region" autocomplete="off"  class="layui-input">
                                </div>
                            </div>
                            <ul id="groupRegion" class="ztree importDataRegionHeight" ></ul>
                        </form>

                    </div>
                </div>
            </div>
        </div>
        <div class="layui-col-sm12 layui-col-md10 layui-col-lg10">
            <div class="layui-card template">
                <div class="layui-card-header templateTitle">
                    模板
                    <div id="templateManage-tmpl-box"></div>
                </div>
                <div class="layui-card-body mini-bar" >
                    <div class="templatetablecontent" >
                        <div class="my-table" id="my-table">

                            <!--生成的表 start-->
                            <div class="row tableWidth" >
                                <div id="left_div1" class="table">
                                    <table id="cross_table">
                                        <tbody></tbody>
                                    </table>
                                </div>
                                <div id="right_div1" class="table">
                                    <div id="right_divx" class="table">
                                        <table id="column_table">
                                            <tbody></tbody>
                                        </table>
                                    </div>
                                </div>
                            </div>
                            <div class="column tableWidth" >
                                <div id="left_div2" class="table">
                                    <table id="row_table">
                                        <tbody></tbody>
                                    </table>
                                </div>
                                <div id="right_div2" class="table dataTable template_rightdiv2">
                                    <table id="data_table">
                                        <tbody></tbody>
                                    </table>
                                </div>
                            </div>
                            <!--生成的表 end-->
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<!-- 模板管理按钮权限 -->
<script type="text/tmpl" id="templateManage-tmpl">
    {{ if hasPower("/macro/macroMeta/import:upload")}}
    <a class="layui-btn layui-btn-sm layui-btn-warning" id="uploadDataBtn">上传</a>
    {{/if}}
    {{ if hasPower("/macro/macroMeta/import:input")}}
    <a class="layui-btn layui-btn-sm layui-btn-primary" id="inputDataBtn">录入</a>
    {{/if}}
</script>

<script type="text/tmpl" id="region-tree-tmpl">
    {{ each records}}
     <option value="{{$value.id}}">{{$value.name}}</option>
    {{/each}}
</script>

<!-- js部分 -->
<script type="text/javascript" src="../../../assets/libs/layui/layui.js"></script>
<script type="text/javascript" src="../../../assets/js/common.js?v=313"></script>

<!-- 表格部分 -->
<script src="../../../assets/js/table/jquery.table.js"></script>

<!-- Ztree树部分 -->
<script src="../../../assets/libs/ztree/js/jquery.ztree.core.min.js"></script>
<script src="../../../assets/libs/ztree/js/jquery.ztree.exedit.js"></script>
<script src="../../../assets/libs/ztree/js/jquery.ztree.excheck.min.js"></script>
<script src="../../../assets/libs/copy/clipboard.min.js"></script>

<script src="../../../assets/libs/template-web.js"></script>
<script src="../../../assets/libs/axios.min.js"></script>
<script src="../../../assets/js/config.js"></script>
<script src="../../../assets/js/authority.js"></script>
<script src="../../../assets/js/macro/common.js"></script>

<script src="../../../assets/js/config/region.js"></script>
<script src="../../../assets/js/config/macroTable.js"></script>
<script src="../../../assets/js/macro/macroMeta/importData.js"></script>

</body>

</html>